<?php
class MapelementController extends Yaf_Controller_Abstract{
	const NET_OK = 10;
	const NET_NOAUTH = 20;
	public function init(){
		$user = cookie::get('user');
		if(!$user){
			$this->redirect('/index/login/');
			return false;
		}
		Yaf_Loader::import('import.php');
	}
	/**
	 * 地图元素首页
	 * @method indexAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function indexAction(){
		$params = $_POST;
		//var_dump($params);
	}
	/**
	 * 地图元素新增
	 * @method addMapElemAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function addMapElemAction(){
		$result = net::inst('autoBG')->pointFloorSelect();
		if(isset($result->ret)&&$result->ret == self::NET_OK){
			$this->getView()->assign('floorDetail',$result->list);
		}else if(isset($result->ret)&&$result->ret == self::NET_NOAUTH){
			$this->getView()->assign('error',$result->msg);
		}else{
			$this->getView()->assign('error','服务器连接错误!');
		}
	}
	/**
	 * 地图元素修改
	 * @method mapElemEditAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function mapElemEditAction(){

	}
	/**
	 * 地图元素详情
	 * @method mapElemEditAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function mapElemDetailAction(){
		
	}
}